package ms.maplestory.boot.repository;

import ms.maplestory.boot.client.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

public interface UserRepository extends JpaRepository<User, Integer> {

    @Query(value = "from User where account.id = :accountId and worldId = :worldId")
    User findByAccountIdAndWorldId(@Param("accountId") Integer userId, @Param("worldId") Integer worldId);

}
